package com.itheima.myfile;

import java.io.File;

public class Demo1 {
    public static void main(String[] args) {
        File file = new File("D:\\file\\a.txt");
        String name = file.getName();
        System.out.println(name);
        System.out.println("file = " + file);

        File file1 = new File("D:\\file","b.txt");
        System.out.println("file1 = " + file1);

        File file2 = new File("D:\\file");
        File file3 = new File(file2,"c.txt");
        System.out.println("file3 = " + file3);
    }
}
